/// Main Panel ///
// Shows:
// Logo
// Singleplayer
// Multiplayer
// Create/Manage Deck
// Settings
// Exit

using System.Windows.Forms;
using System.Drawing;
using System.Net;
using System.Threading;
using System;

namespace Xyne
{
	public class MainPanel : Panel
	{
		private PictureBox logo;
		private Button singleplayer;
		private Button multiplayer;
		private Button deck;
		private Button settings;
		private Button exit;
		
		public Button Settings
		{
			get { return settings; }
		}
		
		public Button Exit
		{
			get { return exit; }
		}
		
		public Button Deck
		{
			get { return deck; }
		}
		
		public Button SinglePlayer
		{
			get { return singleplayer; }
		}
		
		public MainPanel()
		{
			ConstructControls();
		}
		
		private void ConstructControls()
		{
			SuspendLayout();
			
			int height = 0;
			int width = 0;
			logo = new PictureBox();
			Image img = new Bitmap("xyne-logo.png");
			logo.Image = img;
			logo.Size = img.Size;
			width = img.Size.Width;
			height += img.Size.Height;
			Controls.Add(logo);
			
			singleplayer = new Button();
			singleplayer.Text = "Singleplayer";
			Controls.Add(singleplayer);
			singleplayer.Location = new Point(5,height);
			singleplayer.Size = new Size(width - 15, 25);
			height += 30;
			
			multiplayer = new Button();
			multiplayer.Text = "Multiplayer";
			Controls.Add(multiplayer);
			multiplayer.Location = new Point(5,height);
			multiplayer.Size = new Size(width - 15, 25);
			height += 30;
			
			deck = new Button();
			deck.Text = "Create/Manage Decks";
			Controls.Add(deck);
			deck.Location = new Point(5,height);
			deck.Size = new Size(width - 15, 25);
			height += 30;
			
			settings = new Button();
			settings.Text = "Settings";
			Controls.Add(settings);
			settings.Location = new Point(5,height);
			settings.Size = new Size(width - 15, 25);
			height += 30;
			
			exit = new Button();
			exit.Text = "Exit";
			Controls.Add(exit);
			exit.Location = new Point(5,height);
			exit.Size = new Size(width - 15, 25);
			height += 30;
			
			height += 30;
			ClientSize = new Size(width, height);
			
			ResumeLayout();
		}
	}
}